home *** CD-ROM | disk | FTP | other *** search
- ;
- ; $RCSfile: Install,v $
- ; $Date: 1995/02/07 22:21:22 $
- ; $Revision: 30.3 $
- ;
- ; PDBase Installer Script
- ;
- ; All rights reserved.
- ; Copyright © 1994,95 Jérome Souquières.
- ;
-
- ;--- set default parameters ---
- (if (= @language "english")
- (
- (set def_catch 0)
- (set def_hlpch 1)
- (set #choosedest "Select destination\n(a drawer will be created)")
- (set #choosedesthelp (cat "Select the directory PDBase will be copied to.\n"
- "Note: a sub-directory will be created.\n\n"))
- (set #choosecat "Which catalogs shall I install?")
- (set #choosehelp "Which help files shall I install?")
- (set #choosecat_hlp (cat "If you run system 2.1 or better,"
- "you should install your prefered language."))
- (set #whereicon "Do you wish to install PDBase project icon?")
- (set #whereicon_hlp (cat "PDBase offers you the possibility to add an icon "
- "to each database you save.\n"
- "The icon file will be located in ENV:PDBase/def_PDBase.info"))
- )
- )
-
- (if (= @language "français")
- (
- (set def_catch 1)
- (set def_hlpch 2)
- (set #choosedest "Choisir la destination\n(un répertoire sera créé)")
- (set #choosedesthelp (cat "Choisissez la destination vers laquelle PDBase sera copié.\n"
- "Note: un sous-répertoire sera créé.\n\n"))
- (set #choosecat "Quels catalogues dois-je installer?")
- (set #choosehelp "Quels fichiers d'aide dois-je installer?")
- (set #choosecat_hlp (cat "Si vous utilisez le système 2.1 ou plus,"
- "vous devriez choisir votre langage préféré."))
- (set #whereicon "Voulez-vous installer l'icone de projet PDBase?")
- (set #whereicon_help (cat "PDBase vous offre la possibilité de créer une icone "
- "pour chaque base que vous sauvegardez.\n"
- "L'icone se trouvera dans ENV:PDBase/def_PDBase.info"))
- )
- )
-
-
-
- ;--- Setup ---
-
- (set sourcePath (expandpath (pathonly @icon)))
- (set sourcePath (pathonly sourcePath))
-
-
- ;----- Ask for destination --------
-
- (set @default-dest (askdir (prompt #choosedest)
- (default @default-dest)
- (help (cat #choosedesthelp
- @askdir-help))
- )
- )
-
-
-
- ;---- Create PDBase directory and Help subdirectory -------
-
- (makedir (tackon @default-dest "PDBase") (infos))
- (set @default-dest (tackon @default-dest "PDBase"))
- (makedir (tackon @default-dest "Help"))
- (copyfiles (source sourcePath)
- (pattern "Help.info")
- (dest @default-dest))
-
-
- ; Copy programs
-
- (copyfiles (source sourcePath)
- (pattern "~(Install#?)" )
- (dest @default-dest)
- (infos)
- (files)
- )
-
-
-
- ;-------- Ask for catalogs --------
-
- (set catch (askoptions (prompt #choosecat)
- (choices "français")
- (default def_catch)
- (help #choosecat_hlp))
- )
-
- ;----- Ask for documentation ------
-
- (set hlpch (askoptions (prompt #choosehelp)
- (choices "english" "français")
- (default def_hlpch)
- (help ""))
- )
-
- ;----- Ask for Icon ---------
-
- (set iconch (askbool (prompt #whereicon)
- (default 1)
- (help #whereicon_hlp))
- )
-
- ;----- Copy catalogs, help files, and icon -----
-
- (if (BITAND catch 1) (copyfiles (source (tackon sourcePath "catalogs"))
- (dest (tackon @default-dest "catalogs"))
- (pattern "français"))
- )
-
-
- (if (BITAND hlpch 1) (copyfiles (source (tackon sourcePath "Help"))
- (pattern "English")
- (dest (tackon @default-dest "Help"))
- (infos))
- )
-
- (if (BITAND hlpch 2) (copyfiles (source (tackon sourcePath "Help"))
- (pattern "Français")
- (dest (tackon @default-dest "Help"))
- (infos))
- )
-
- (if (= iconch 1)
- (
- (copyfiles (source (tackon sourcePath "icon")
- (pattern "PDBase")
- (dest "ENVARC:")
- (infos))
- )
- (copyfiles (source (tackon sourcePath "icon")
- (pattern "PDBase")
- (dest "ENV:")
- (infos))
- )
- (tooltype (dest "ENVARC:PDBase/def_PDBase")
- (setdefaulttool (tackon @default-dest "PDBase"))
- )
- (tooltype (dest "ENV:PDBase/def_PDBase")
- (setdefaulttool (tackon @default-dest "PDBase"))
- )
- )
- )
-
-